package webgamemaker.Common;

import java.util.Map;

public class AnimTile implements Tile 
{
	public Tile tiles[];
	
	public AnimTile(Tile tiles[])
	{
		this.tiles = tiles;
	}
	
	public void draw(Map<String, Object> param) 
	{
		if(!param.containsKey("frame"))
			tiles[0].draw(param);
		else tiles[(Integer)param.get("frame")].draw(param);
	}

	public int[] getSize() 
	{
		return tiles[0].getSize();
	}

}
